32-bit clean[A5 registerand A5 world(grow-zone functions saving and restoringsetting and restoringA5 worlddefinedsettingAND operator[AND operator]application global variablesapplication heapdefined determining amount of free space)maximizing space to prevent fragmentation
introducedlocking blocks to preventreferencing callback routines using local variables to preventdereferenced handles'dialog boxes, and low-memory situationsdisposed handleschecking fordefinedpreventing dereferencing ofproblems usingDisposeHandle procedureDisposePtr proceduredouble indirection
empty handleschecking fordefinedEmptyHandle procedureused by a grow-zone functionfake handlescreatingdefinedproblems using%fragmentation. See heap fragmentationgaps in heaps, danger ofGetApplLimit function3global variables. See application global variables\grow-zone functionsdefined
example offinding protected blocksettingusing SetA5 functionusing SetCurrentA5 functionGZRootHnd global variableGZSaveHnd functionHandle data typehandleschecking validity ofdefinedheap compactiondefined%movement of relocatable blocks duringheap fragmentation causes ofdefinedduring memory reservationmaximizing heap size to prevent
preventingsummary of preventionheap purgingheap. See application heap\HGetState functionHLock procedureHLockHi procedureHNoPurge procedureHPurge procedureHSetState procedureHUnlock procedureInitZone procedureinterrupt tasksand Memory Manager routinesinterrupt time#avoiding Memory Manager routines at
jump tablejump table entriesfor callback routines(linked lists, allocating new elements in,loading code segments, and dangling pointerslocking relocatable blockslow-memory conditionsmaster pointer blocksmaster pointersallocating manuallydefined#determining how many to preallocate$number per block in application zonerunning out ofMaxApplZone procedureand ApplLimit global variable,and heap fragmentation[MaxApplZone procedureheap fragmentation]heap fragmentation]automatic execution ofMemError functionmemoryallocating and releasingorganization ofmemory cushionsdefineddetermining optimal size ofmaintainingMemory Manager24-bit32-bitallocating master pointersand application heapcalling grow-zone functioncompacting heap
data typesmovement of blocks bypurging heapreserving memoryreturning result codes(memory reservation. See reserving memorymemory reservesbenefits ofdefinedmaintainingMoreMasters procedureMoveHHi proceduremoving relocatable blocks highNewHandle functionNewHandleClear functionNewPtr functionNewPtrClear function9nonessential memory requests, checking whether to satisfynonrelocatable blocks
advantages of
allocatingallocating temporarily
data type fordefineddisposal and reallocation of releasingwhen to allocate
partitions!.See also application partitions\pointersProcPtr data type&and code segmentationProcPtr data typecode segmentation]code segmentation]defineddetermining which they arehandle to returned by GZSaveHnd
Ptr data typePurgeSpace procedurepurging heap zonesQuickDraw global variablesdefinedReallocateHandle procedurerelocatable blocks
allocatingchanging properties
data type fordefineddisadvantages ofemptyinggetting propertiesin bottom of heap zonelocking+for long periods of time[relocatable blockslockinglong periods of time]long periods of time]lockinglong periods of time],for short periods of time[relocatable blockslockingshort periods of time]short periods of time]lockingshort periods of time]+for long periods of time[relocatable blockslockinglong periods of time]long periods of time],for short periods of time[relocatable blockslockingshort periods of time]short periods of time]lockingshort periods of time]lockinglong periods of time],for short periods of time[relocatable blockslockingshort periods of time]short periods of time]lockingshort periods of time]long periods of time]short periods of time]short periods of time]short periods of time],for short periods of time[relocatable blockslockingshort periods of time]short periods of time]lockingshort periods of time]making purgeablemaking unpurgeablemanagingmaster pointers after disposingmaster pointers for#moving around nonrelocatable blocksmoving high
properties ofreallocating releasingrestrictions on locked blockssetting propertiessizingmovement duringmovement during unlockingwhen to lockunlocking relocatable blocks)updating windows, saving memory space forvirtual memory
introduced^WITH statement (Pascal), and dangling pointers[WITH statement (Pascal), and dangling pointers]zero (memory location)See 0 (memory location)zero-length handlesSee 0-length handles#'sysz' resource type[sysz resource]@ operator[@ operator]-_OSDispatch trap macro[OSDispatch trap macro].See also heap zonesdefinedgetting a pointer toinitializing$subdividing into multiple heap zonesApplicationZone functionApplZone global variableblock contents
block headers .See also nonrelocatable blocks\
concatenatingmanipulatingsize correction forBufPtr global variable%limitation on lowering during startupByte data type(code resources, copying into system heapcompacting heap zonesCompactMem functionCompactMemSys functionconcatenating memory blockscurrent heap zonedangling pointerspointers]DeskHook global variableclearing in PascalDetachResource procedureduplicating relocatable blocks-Finder, allocation of memory for disk copying
free space assessing+assessing availability for temporary memoryFreeMem functionFreeMemSys functionGetHandleSize functionAGetNextEvent function, and temporary memory[GetNextEvent functiontemporary memory]GetPtrSize functionGetZone functionHandAndHand function#.See also relocatable blockshandles]]
recoveringrelative]HandleZone functionHandToHand functionHClrRBit procedureroutines forroutines for
heap zones.See also zone headers\ accessingchangingdefinedgetting current zoneinitializingmanipulatingorganization of$subdividing into multiple heap zones'high memory, allocating at startup timeHSetRBit procedureInitApplZone procedure3initializing new heap zones within other heap zones?interprocess buffers, and temporary memory[interprocess bufferstemporary memory]$and temporary memory[interrupt taskstemporary memory]temporary memory]#avoiding Memory Manager routines atlogical sizes of blockslow-memory global variablesSee system global variablesMaxBlock functionMaxBlockSys functionmaximizing heap zone spaceMaxMem functionMaxMemSys functionmaxSize constantMC680x0 microprocessorsize of memory blocks withMemErr global variable.See also temporary memory\allocating during startup assessingchanging sizes of blocksfreeing.memory blocks. See blocks, memorymemory blocks]application-defined routinescapabilities ofdefinedroutinestesting for featuresMemTop global variablemultiple heap zonesimplementinguses forNewEmptyHandle functionNewEmptyHandleSys functionNewHandleSys functionNewHandleSysClear functionNewPtrSys functionNewPtrSysClear function-.See also blocks, memorynonrelocatable blocks]]sizing=operating system queues, storing elements in system heap zoneoriginal application heap zonephysical sizes of blocks .See also nonrelocatable blocks\"referencing code in code resourcesprotected blocksdetermining which they arehandle to returned by GZSaveHndPtrAndHand functionPtrToHand functionPtrToXHand functionPtrZone functionpurge-warning proceduresdefinedinstalled by SetResPurgerestrictions onsampleusing SetA5 functionusing SetCurrentA5 functionPurgeMem procedurePurgeMemSys procedureRecoverHandle functionrelative handles.See also blocks, memory\clearing resource bit
concatenatingduplicatingsetting resource bit!relocatable blocksblocks (memory)]ReserveMem procedureReserveMemSys procedurereserving memoryroutinesresource bitclearingsetting5Resource Manager, installing purge-warning proceduresresource types'sysz'[ resource typessysz]sysz]SetA5 functionused in a grow-zone function!used in a purge-warning procedureSetApplBase procedureSetApplLimit procedureSetCurrentA5 functionused in a grow-zone function!used in a purge-warning procedureSetGrowZone procedureSetHandleSize procedureSetPtrSize procedure:SetResPurge procedure, installing purge-warning proceduresSetZone procedureSignedByte data typesize correction for blocksSize data typestackdetermining available spaceStackSpace functionstartup processallocating memory duringdisplaying windows duringStr255 data typeStringHandle data typeStringPtr data typeSysEqu.p interface file4system extensions, allocating memory at startup timesystem global variableschangingdefinedreadinguses ofsystem heap zoneallocating memory increating new heap zones withindefinedgetting a pointer toinstalling interrupt code intouses forSystemZone functionSysZone global variable tag bytesTempFreeMem functionTempMaxMem functionTempNewHandle functiontemporary memory
allocating confirming success of allocationdefineddetermining zone oflimitation on lockingoperating on blocksoptimal usage of)release of during application terminationroutinestesting for features oftracking ofusing as a heap zoneTheZone global variable
THz data typeTopMem functionCWaitNextEvent function, and temporary memory[WaitNextEvent functiontemporary memory]Zone data structurezone headers
zone pointerszone recordszone trailer blocks
zone trailers_DebugUtil trap[DebugUtil trap]5_MemoryDispatch trap macro[MemoryDispatch trap macro]E_MemoryDispatchA0Result trap macro[MemoryDispatchA0Result trap macro]Address Management Unit (AMU))address space. See logical address space\AMU (Address Management Unit)AppleShare, and paging devices!backing volume. See paging devicebacking-store filesdefinedbus-error vectorscompletion routinesdeferred under virtual memoryconcurrent driverscontrol panels, Memory.See Memory control panel
data cacheand virtual memoryDebuggerEnter procedureDebuggerExit procedureDebuggerGetMax functionDebuggerLockMemory functionDebuggerPoll proceduredebuggers, and virtual memoryDebuggerUnlockMemory functionDeferUserFn function
introducedusing$device drivers, avoiding page faultsdirect memory access (DMA)DMA. See direct memory accessdouble page faultsGetPageState functionGetPhysical function(and discontiguous physical address space
introducedusingholding physical memoryHoldMemory functiondeferring under virtual memory-deferring code execution under virtual memoryinterrupts, nonmaskable!ISP. See stack pointer, interruptlocking physical memorydebugger routinedefinedroutines forLockMemory function
introducedLockMemoryContiguous functionlogical address spacepossible fragmentation ofsize of with 24-bit addressingsize of with 32-bit addressing%translating to physical address space<logical-to-physical translation table. See translation table%LogicalToPhysicalTable data structureholding releasingmemory addressesmapping logical to physical1memory configuration, obtaining information aboutMemory control panelmemory management unit (MMU)memory-block recordMemoryBlock data structureMMU (memory management unit)nonmaskable interruptspage faults.See also double page faultsdefinedhandling%intercepted by Virtual Memory Managerprotection against#Paged Memory Management Unit (PMMU)PageFaultFatal function
pages, memorydefinedholdinglockinglocking contiguously releasing unlockingPageState data typepaging
paging devicephysical address space
discontiguousphysical memoryholding pages inlocking pages inreleasing pagesunlocking pages#PMMU (Paged Memory Management Unit)releasing held pages#removable disks, and virtual memory3slot-based VBL tasks, deferred under virtual memory
stack pointerinterrupt (ISP)
user (USP)supervisor modesystem heap held in RAM under virtual memorythirty-two bit addressing]Time Manager tasksdeferred under virtual memory)translating logical to physical addressestranslation tablestwenty-four bit addressing]UnholdMemory functionunlocking physical memorydebugger routineUnlockMemory functionUSP. See stack pointer, user VBL tasksdeferred under virtual memoryVector Base Register (VBR)and AppleShare volumesand removable disksand user interruptsbus-error vectors underCPU data cachingdebugger routinesdebugger support for"deferring interrupt code executionmanagement routinesmapping information, gettingrequirements for runningtesting for availabilityVirtual Memory Manager.See also virtual memorydata structuresdefinedroutines%setting with the Memory control panel&setting with the Memory control panel[stripping flag bitsmachines that support[%setting with the Memory control panel&setting with the Memory control panel[using temporarily[32-bit addressing[W_BlockMove trap, flushing instruction cache[BlockMove trap, flushing instruction cache]%_HWPriv trap macro[HWPriv trap macro]S_LoadSeg trap, flushing instruction cache[LoadSeg trap, flushing instruction cache]M_Read trap, flushing instruction cache[Read trap, flushing instruction cache]W_UnloadSeg trap, flushing instruction cache[UnloadSeg trap, flushing instruction cache]/use of by Toolbox and Operating System routines!using to access QuickDraw globals accessing in completion routinesaccessing in interrupt tasksaddress-translation modegettingsettingtemporarily changingaddresses. See memory addressesaddressing modes24-bit32-bitcurrent mode, getting switching accessing in completion routinesaccessing in interrupt tasks(volume specified in Memory control panelcaches. See data cache\maintaining the A5 register in(click-loop routines, and the A5 registermaintaining the A5 register in.control action procedures, and the A5 register2control definition procedures, and the A5 registercopy-back cache/and callback routines[CurrentA5 global variablecallback routines]callback routines]
getting valuedefinedflushing#deferred tasks, and the A5 registerand stale data
disk cachedefined%setting with the Memory control paneldisk cache\ flag bitsmaster pointer strippingFlushCodeCache procedureFlushCodeCacheRange functionFlushDataCache procedureflushing
data cacheinstruction cacheFlushInstructionCache procedureGetMMUMode function'and the A5 register[grow-zone functionsA5 register]A5 register]HFS RAM Cache panel,I/O completion routines, and the A5 registerinstruction cachedefinedflushingmaintaining the A5 registerand stale instructionsand stale datamaster pointer flag bits comparinginstruction cache comparingconverting to 32-bit modestripping flag bits fromtranslatingaddressing mode controlsdisk cache controlsillustrated
introducedRAM disk controlsvirtual memory controls/menu definition procedures, and the A5 register&Notification Manager, and the A5 world5notification response procedures, and the A5 register7OpenResFile function, calling StripAddress on filenames6OpenRFPerm function, calling StripAddress on filenamesordered address comparisonspatches, and stale instructions&Process Manager, and callback routinesprocessor caches.See also data cache\7program counter, fixing before switching to 32-bit modereading in stand-alone codestructure ofusing in stand-alone codeRAM cache. See disk cache RAM disksdefined)setting size of with Memory control panelreference constant fieldsusing to store A5 value+self-modifying code, and stale instructions
stale dataavoiding problems withdefinedstale instructionsavoiding problems withdefined@stand-alone code resources, changing address-translation mode inStripAddress functionSwapDataCache functionSwapInstructionCache functionSwapMMUMode procedurecalling from stand-alone codethirty-two bit addressingmachines that support]&setting with the Memory control panel]using temporarily]&and the A5 register[Time Manager tasksA5 register]A5 register]!trap patches, and the A5 registertwenty-four bit addressing&setting with the Memory control panel]stripping flag bits]and the A5 register[VBL tasksA5 register]A5 register]backing-store file%setting with the Memory control panel1window definition procedures, and the A5 register(word-break routines, and the A5 registerwrite-through cache